import request from '@/utils/request'

// 创建主体信息
export function createInfo(data) {
  return request({
    url: '/market/info/create',
    method: 'post',
    data: data
  })
}

// 更新主体信息
export function updateInfo(data) {
  return request({
    url: '/market/info/update',
    method: 'put',
    data: data
  })
}

// 删除主体信息
export function deleteInfo(id) {
  return request({
    url: '/market/info/delete?id=' + id,
    method: 'delete'
  })
}

// 获得主体信息
export function getInfo(id) {
  return request({
    url: '/market/info/get?id=' + id,
    method: 'get'
  })
}

// 获得主体信息分页
export function getInfoPage(params) {
  return request({
    url: '/market/info/page',
    method: 'get',
    params
  })
}
// 导出主体信息 Excel
export function exportInfoExcel(params) {
  return request({
    url: '/market/info/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
// 获得地区分类列表
export function getproductCategoryList(params) {
  return request({
    url: '/market/product-category/list',
    method: 'get',
    params
  })
}